/*
* Portuguese eID Card API .NET Wrapper
*
* Written by Fernando Nunes (fernando.nunes@devscope.net)
* Copyright (c) 2009 DevScope Information Systems
*
* This library is free software; you can redistribute it and/or 
* modify it under the terms of the GNU Lesser General Public 
* License as published by the Free Software Foundation; either 
* version 2.1 of the License, or (at your option) any later version. 
* 
* This library is distributed in the hope that it will be useful, 
* but WITHOUT ANY WARRANTY; without even the implied warranty of 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
* Lesser General Public License for more details. 
* 
* You should have received a copy of the GNU Lesser General Public 
* License along with this library; if not, write to the Free Software 
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 
*/

#pragma once
#include "Stdafx.h"
#include "Id.h"
#include "Interop.h"

using namespace System;
using namespace DevScope::CartaoDeCidadao;

Id::Id(const PTEID_ID& i)
{
	this->Version = i.version;
	this->DeliveryEntity = Interop::CStrToNetStr((char*)i.deliveryEntity);
	this->Country = Interop::CStrToNetStr((char*)i.country);
	this->DocumentType = Interop::CStrToNetStr((char*)i.documentType);
	this->CardNumber = Interop::CStrToNetStr((char*)i.cardNumber);
	this->CardNumberPAN = Interop::CStrToNetStr((char*)i.cardNumberPAN);
	this->CardVersion = Interop::CStrToNetStr((char*)i.cardVersion);
	this->BirthDate = Interop::CStrToNetStr((char*)i.birthDate);
	this->DeliveryDate = Interop::CStrToNetStr((char*)i.deliveryDate);
	this->Locale = Interop::CStrToNetStr((char*)i.locale);
	this->ExpiryDate = Interop::CStrToNetStr((char*)i.validityDate);
	this->Name = Interop::CStrToNetStr((char*)i.name);
	this->FirstName = Interop::CStrToNetStr((char*)i.firstname);
	this->Sex = Interop::CStrToNetStr((char*)i.sex);
	this->Nationality = Interop::CStrToNetStr((char*)i.nationality);
	this->BirthDate = Interop::CStrToNetStr((char*)i.birthDate);
	this->Height = Interop::CStrToNetStr((char*)i.height);
	this->BI = Interop::CStrToNetStr((char*)i.numBI);
	this->NameFather = Interop::CStrToNetStr((char*)i.nameFather);
	this->FirstNameFather = Interop::CStrToNetStr((char*)i.firstnameFather);
	this->NameMother = Interop::CStrToNetStr((char*)i.nameMother);
	this->FirstNameMother = Interop::CStrToNetStr((char*)i.firstnameMother);
	this->NIF = Interop::CStrToNetStr((char*)i.numNIF);
	this->NSS = Interop::CStrToNetStr((char*)i.numSS);
	this->SNS = Interop::CStrToNetStr((char*)i.numSNS);
	this->Notes = Interop::CStrToNetStr((char*)i.notes);
	this->Mrz1 = Interop::CStrToNetStr((char*)i.mrz1);
	this->Mrz2 = Interop::CStrToNetStr((char*)i.mrz2);
	this->Mrz3 = Interop::CStrToNetStr((char*)i.mrz3);
}
